<?php

namespace app\api\service;

use app\model\Video;
use think\facade\Session;
use app\model\Game;


class GameService
{
    private $GameModel;


    public function __construct(game $GameModel)
    {
        $this->gameModel = $GameModel;


    }

    public function getGameList($params)
    {
        $page = $params['page'] ?? 1;
        $limit = $params['limit'] ?? 10;

        $where = [];

        // 用户id搜索
        if (!empty($params['keyword'])) {
            $where[] = ['appname', 'like', "%" . $params['keyword'] . "%"];
        }


        $data = $this->gameModel->getPagingDataByWhere($where, $page, $limit, '*');


        return $data;
    }
}